package task;

import java.util.Scanner;

public class Task6_6 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("需要输入几个元素：");
        int n = input.nextInt();
        System.out.println("请输入");
        int[] array = new int[n];
        for (int i = 0; i < array.length; i++) {
            array[i] = input.nextInt();
        }
        int sum = 0;
        for (int i = 0; i < array.length; i++) {
            sum = sum ^ array[i];
        }
        System.out.println(sum);
    }
}
